package com.ruoyi.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.inspection.domain.FzInspectionRouteInfo;
import com.ruoyi.inspection.mapper.FzInspectionRouteInfoMapper;
import com.ruoyi.inspection.service.IFzInspectionRouteInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 路线信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-13
 */
@Service
public class FzInspectionRouteInfoServiceImpl implements IFzInspectionRouteInfoService
{
    @Autowired
    private FzInspectionRouteInfoMapper fzInspectionRouteInfoMapper;

    /**
     * 查询路线信息
     * 
     * @param id 路线信息ID
     * @return 路线信息
     */
    @Override
    public FzInspectionRouteInfo selectFzInspectionRouteInfoById(Integer id)
    {
        return fzInspectionRouteInfoMapper.selectFzInspectionRouteInfoById(id);
    }

    /**
     * 查询路线信息列表
     * 
     * @param fzInspectionRouteInfo 路线信息
     * @return 路线信息
     */
    @Override
    public List<FzInspectionRouteInfo> selectFzInspectionRouteInfoList(FzInspectionRouteInfo fzInspectionRouteInfo)
    {

        return fzInspectionRouteInfoMapper.selectFzInspectionRouteInfoList(fzInspectionRouteInfo);
    }

    /**
     * 新增路线信息
     * 
     * @param fzInspectionRouteInfo 路线信息
     * @return 结果
     */
    @Override
    public int insertFzInspectionRouteInfo(FzInspectionRouteInfo fzInspectionRouteInfo)
    {

        fzInspectionRouteInfo.setCreateTime(DateUtils.getNowDate());
        return fzInspectionRouteInfoMapper.insertFzInspectionRouteInfo(fzInspectionRouteInfo);
    }

    /**
     * 修改路线信息
     * 
     * @param fzInspectionRouteInfo 路线信息
     * @return 结果
     */
    @Override
    public int updateFzInspectionRouteInfo(FzInspectionRouteInfo fzInspectionRouteInfo)
    {
        fzInspectionRouteInfo.setUpdateTime(DateUtils.getNowDate());
        return fzInspectionRouteInfoMapper.updateFzInspectionRouteInfo(fzInspectionRouteInfo);
    }

    /**
     * 删除路线信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzInspectionRouteInfoByIds(String ids)
    {
        return fzInspectionRouteInfoMapper.deleteFzInspectionRouteInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除路线信息信息
     * 
     * @param id 路线信息ID
     * @return 结果
     */
    @Override
    public int deleteFzInspectionRouteInfoById(Integer id)
    {
        return fzInspectionRouteInfoMapper.deleteFzInspectionRouteInfoById(id);
    }

    @Override
    public List<String> inspectionIdList(String routeId) {
        return  fzInspectionRouteInfoMapper.selectFzInspectionRouteInfoIdById(routeId);
    }


}
